package edu.fiap.controller;

import java.io.File;
import java.util.logging.Logger;

import com.opensymphony.xwork2.ActionSupport;

import edu.fiap.model.service.PagamentoService;
import edu.fiap.util.ProjectLoggerFactory;

public class PagamentoController extends ActionSupport {

	private static final long serialVersionUID = 1030016085328245361L;
	
	private static final Logger logger = ProjectLoggerFactory.getLogger();
	
	private File fileUpload;
	private String fileUploadContentType;
	private String fileUploadFileName;
	
	public String initializer(){
		logger.info("initializer");
		return Navigation.PAGAMENTO_INITIALIZER;
	}
	
	public String processarPagamentoViaBanco(){
		PagamentoService.processarPagamentoViaBanco(fileUpload);
		return initializer();
	}

	public String getFileUploadContentType() {
		return fileUploadContentType;
	}

	public void setFileUploadContentType(String fileUploadContentType) {
		this.fileUploadContentType = fileUploadContentType;
	}

	public String getFileUploadFileName() {
		return fileUploadFileName;
	}

	public void setFileUploadFileName(String fileUploadFileName) {
		this.fileUploadFileName = fileUploadFileName;
	}

	public File getFileUpload() {
		return fileUpload;
	}

	public void setFileUpload(File fileUpload) {
		this.fileUpload = fileUpload;
	}

}